package com.hl.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 退款记录对象 refund
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
public class Refund extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Integer id;

    /** 退款单号 */
    @Excel(name = "退款单号")
    private String refundNo;

    /** 售后单号 */
    @Excel(name = "售后单号")
    private String afterSaleNo;

    /** 原始订单号 */
    @Excel(name = "原始订单号")
    private String orderNo;

    /** 第三方支付平台的原始支付交易流水号 */
    @Excel(name = "第三方支付平台的原始支付交易流水号")
    private String thirdPaymentNo;

    /** 第三方支付平台生成的退款交易流水号 */
    @Excel(name = "第三方支付平台生成的退款交易流水号")
    private String thirdRefundNo;

    /** 退款金额，单位：元，精确到分 */
    @Excel(name = "退款金额，单位：元，精确到分")
    private BigDecimal refundAmount;

    /** 用户提交退款申请的时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户提交退款申请的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 退款状态：1-未退款，2-已退款 */
    @Excel(name = "退款状态：1-未退款，2-已退款")
    private Integer refundStatus;

    /** 原始订单的支付方式，如：1支付宝、2微信支付、3银行卡等 */
    @Excel(name = "原始订单的支付方式，如：1支付宝、2微信支付、3银行卡等")
    private Integer paymentMethod;

    /** 申请退款的会员ID，关联用户表 */
    @Excel(name = "申请退款的会员ID，关联用户表")
    private String memberId;

    /** 商家ID，关联商家信息表 */
    @Excel(name = "商家ID，关联商家信息表")
    private String merchantId;

    /** 系统实际发起退款操作的时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "系统实际发起退款操作的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    /** 第三方支付平台确认退款完成的时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "第三方支付平台确认退款完成的时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundCompleteTime;

    /** 退款失败原因，如：基本账户余额不足，请充值后重新发起；订单号非法等 */
    @Excel(name = "退款失败原因，如：基本账户余额不足，请充值后重新发起；订单号非法等")
    private String failReason;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setRefundNo(String refundNo) 
    {
        this.refundNo = refundNo;
    }

    public String getRefundNo() 
    {
        return refundNo;
    }

    public void setAfterSaleNo(String afterSaleNo) 
    {
        this.afterSaleNo = afterSaleNo;
    }

    public String getAfterSaleNo() 
    {
        return afterSaleNo;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setThirdPaymentNo(String thirdPaymentNo) 
    {
        this.thirdPaymentNo = thirdPaymentNo;
    }

    public String getThirdPaymentNo() 
    {
        return thirdPaymentNo;
    }

    public void setThirdRefundNo(String thirdRefundNo) 
    {
        this.thirdRefundNo = thirdRefundNo;
    }

    public String getThirdRefundNo() 
    {
        return thirdRefundNo;
    }

    public void setRefundAmount(BigDecimal refundAmount) 
    {
        this.refundAmount = refundAmount;
    }

    public BigDecimal getRefundAmount() 
    {
        return refundAmount;
    }

    public void setApplyTime(Date applyTime) 
    {
        this.applyTime = applyTime;
    }

    public Date getApplyTime() 
    {
        return applyTime;
    }

    public void setRefundStatus(Integer refundStatus) 
    {
        this.refundStatus = refundStatus;
    }

    public Integer getRefundStatus() 
    {
        return refundStatus;
    }

    public void setPaymentMethod(Integer paymentMethod) 
    {
        this.paymentMethod = paymentMethod;
    }

    public Integer getPaymentMethod() 
    {
        return paymentMethod;
    }

    public void setMemberId(String memberId) 
    {
        this.memberId = memberId;
    }

    public String getMemberId() 
    {
        return memberId;
    }

    public void setMerchantId(String merchantId) 
    {
        this.merchantId = merchantId;
    }

    public String getMerchantId() 
    {
        return merchantId;
    }

    public void setRefundTime(Date refundTime) 
    {
        this.refundTime = refundTime;
    }

    public Date getRefundTime() 
    {
        return refundTime;
    }

    public void setRefundCompleteTime(Date refundCompleteTime) 
    {
        this.refundCompleteTime = refundCompleteTime;
    }

    public Date getRefundCompleteTime() 
    {
        return refundCompleteTime;
    }

    public void setFailReason(String failReason) 
    {
        this.failReason = failReason;
    }

    public String getFailReason() 
    {
        return failReason;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("refundNo", getRefundNo())
            .append("afterSaleNo", getAfterSaleNo())
            .append("orderNo", getOrderNo())
            .append("thirdPaymentNo", getThirdPaymentNo())
            .append("thirdRefundNo", getThirdRefundNo())
            .append("refundAmount", getRefundAmount())
            .append("applyTime", getApplyTime())
            .append("refundStatus", getRefundStatus())
            .append("paymentMethod", getPaymentMethod())
            .append("memberId", getMemberId())
            .append("merchantId", getMerchantId())
            .append("refundTime", getRefundTime())
            .append("refundCompleteTime", getRefundCompleteTime())
            .append("failReason", getFailReason())
            .toString();
    }
}
